<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="resources/css/basic.css" type="text/css" />
<link rel="stylesheet" href="resources/css/galleriffic-2.css" type="text/css" />
<script type="text/javascript" src="resources/js/feedUtils.js"></script>
<script type="text/javascript" src="resources/js/mediaUtils.js"></script>
<script type="text/javascript" src="resources/js/lib/jquery/jquery.history.js"></script>
<script type="text/javascript" src="resources/js/lib/jquery/jquery.galleriffic.js"></script>
<script type="text/javascript" src="resources/js/lib/jquery/jquery.opacityrollover.js"></script>


<script type="text/javascript">
    var STREAMING_SERVICE = "<c:out value = "${serverName}"/>/norsemanserver/streaming/";
    var routeId = <c:out value = "${routeId}"/>;

    var gallery;
    var username = "<c:out value = "${userInfo.username}"/>";
        
    $(document).ready(function(){
        initialize()
    });

    function insertIndividualMediaFeed(jsonObject){
        var name =  "";
        if (jsonObject.typeOfAttendant == 'ATHLETE') {
            name = jsonObject.username;
        } else if (jsonObject.typeOfAttendant == 'SUPPORT') {
            name = jsonObject.athleteUsername;
        }

        if(name == username){
            insertForLiveMediaFeed(jsonObject);
        }
    }
    
    function initialize() {
        initGallery();
        //register live media feed comming event
        //liveMediaFeedCommingEvent.addHandler(insertIndividualMediaFeed);
        //register live location for new ticker
        liveMediaFeedCommingEvent.addHandler(insertNewMediaTickerPost);
    }
    
    jQuery(document).ready(function($) {
    });
</script>